/*
 * @Author: wangdian
 * @Date: 2023-06-07 11:03:08
 * @LastEditors: wangdian
 * @LastEditTime: 2023-06-07 11:03:23
 * @Description: file content
 * @FilePath: \workspace\decompress.js
 */

// 解压该文件
var fs = require("fs");
var zlib = require('zlib');

// 解压 input.txt.gz 文件为 input.txt
fs.createReadStream('input.txt.gz')
    .pipe(zlib.createGunzip())
    .pipe(fs.createWriteStream('input.txt'));

console.log("文件解压完成。");